/*
 * Copyright (C), 2017, 上海云首信息科技有限公司
 *
 * Author: 邓哲航
 * Date: 2018/5/12 下午6:59
 * History:
 * <author>    <time>    <version>    <desc>
 *
 */
package com.leaptocloud.easycloud.demo.domain;

import org.apache.ibatis.type.Alias;

import java.util.LinkedList;
import java.util.List;

/**
 * @author 邓哲航
 * @see
 * @since 2.3.8
 */
@Alias("user")
public class User {

    private Long id;

    private String login;

    private String name;

    private List<Hobbit> hobbits = new LinkedList<>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Hobbit> getHobbits() {
        return hobbits;
    }

    public void setHobbits(List<Hobbit> hobbits) {
        this.hobbits = hobbits;
    }

    public static class Hobbit {

        public Hobbit(){}

        private String name;
        private int period;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getPeriod() {
            return period;
        }

        public void setPeriod(int period) {
            this.period = period;
        }
    }
}
